package top.ryw.ssm2.service.impl;

import org.springframework.stereotype.Service;
import top.ryw.ssm2.mapper.DeptMapper;
import top.ryw.ssm2.mapper.UserMapper;
import top.ryw.ssm2.pojo.Dept;
import top.ryw.ssm2.pojo.User;
import top.ryw.ssm2.service.DeptService;
import top.ryw.ssm2.service.UserService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {
    @Resource
    private DeptMapper deptMapper;

    public Dept getById(int id) {
        return deptMapper.selectById(id);
    }

    public int insert(Dept user) {
        return deptMapper.insert(user);
    }

    public List<Dept> selectList() {
        return deptMapper.selectList();
    }
}
